package com.example.basic.web.model.parameter;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 全局参数表
 * </p>
 *
 * @author zhangzq
 * @since 2023-12-08
 */
@Data
@TableName("sys_parameter")
@ApiModel(value="Parameter对象", description="全局参数表")
public class Parameter extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {

    @ApiModelProperty(value = "数据id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "参数码")
    @TableField("param_code")
    private String paramCode;

    @ApiModelProperty(value = "参数名称")
    @TableField("param_name")
    private String paramName;

    @ApiModelProperty(value = "参数名称说明")
    @TableField("param_name_desc")
    private String paramNameDesc;

    @ApiModelProperty(value = "参数值")
    @TableField("param_value")
    private String paramValue;

    @ApiModelProperty(value = "参值可选值说明")
    @TableField("param_value_desc")
    private String paramValueDesc;
}